import socket

class OTAUpdater:
    def connect(self, ip: str, port: int):
        """连接设备"""
        self.sock = socket.socket()
        self.sock.connect((ip, port))

    def send_update(self, data: bytes):
        """发送OTA更新"""
        self.sock.sendall(data)